import re
class Joomla:
    def getConfig(self, key):
        fh = open('/var/www/joomla/configuration.php', "r")
        for line in fh.readlines():
            m = re.search(r"^var [ \t]*\$+" +  key + "{1}[ \t\n]*=+[ \t\n]*[']{1}(?P<value>\w+)[']{1}\;", line)

            if m != None:
                return m.group('value')
        return None

    def validateDir(self):
        return True

            